# Contributor: Isaac Dunham <ibid.ag@gmail.com>
# Maintainer:
pkgname=meep
pkgver=1.22.0
pkgrel=1
pkgdesc="FDTD finite-difference time-domain solver"
url="https://meep.readthedocs.io/"
arch="x86_64 ppc64le s390x"
license="GPL-2.0-or-later"
makedepends="harminv-dev>=1.4.1-r3 openblas-dev>=0.3.0 libctl-dev
	guile-dev hdf5-dev gsl-dev gfortran gmp-dev fftw-dev"
# Omit -doc because it requires latex2html to build
subpackages="$pkgname-dev"
source="https://github.com/NanoComp/meep/releases/download/v$pkgver/meep-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-portable-binary \
		--with-blas=openblas \
		--with-lapack=openblas
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
0b448693472658d61ab9314e065083105f4d08d5bcee912c01960bce03b308996b75fdac2fdb2882115836ea8ec6185cd20ad303be895d43ebdd51097634b92a  meep-1.22.0.tar.gz
"
